<template>
  <div>
    <ul>
      <li v-for='(item,index) in message'>{{item.title}}</li>
    </ul>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        message: ''
      }
    },
    mounted(){
      this.getData();
    },
    methods:{
      getData:function(){
        var that = this;  //用that去保存vue的实例
    	  that.$axios.post('/list/index').then(response => {
          that.message = response.data.list;
          console.log(response);
        })
        
      }
    }
  }
</script>